测试链接：https://leetcode.cn/problems/longest-substring-without-repeating-characters/description/
class Solution {
public:
    char buffer[256] = {0};
    bool Is_Check_Character(char a)
    {
        return buffer[a] != 0;
    }
    int lengthOfLongestSubstring(string s) {
        int ans = 0;


        for(int l = 0, r = 0; r < s.size(); r++)
        {
            while(Is_Check_Character(s[r]))
            {
                buffer[s[l]]--;
                l++;
            }
            buffer[s[r]]++;
            ans = max(ans, r-l+1);
        }

        return ans;
    }
};